﻿using Basic.WxApiService.Interface;
using Basic.WxRemoteModel.WxMsg.Model;
using Basic.WxService.ConstDic;
using Basic.WxService.Interface;
using WeDonekRpc.Client.Attr;

namespace Basic.WxService.PlatformMsg
{
    [IocName(WxPlatformEventDic.ComponentVerifyTicket)]
    internal class WxVerifyTicketEvent : IWxPlatformMsgEvent
    {
        private readonly IWxVerifyTicketService _Service;

        public WxVerifyTicketEvent (IWxVerifyTicketService service)
        {
            this._Service = service;
        }

        public void ExecMsg (WxPlatformMsg msg)
        {
            this._Service.SetVerifyTicket(msg.PlatformAppId, msg.EventBody["ComponentVerifyTicket"]);
        }
    }
}
